-- Radical by Basil Voronkov
-- Module 'radical'
---------------------------------------------
-- This is an 'includes' module. It includes all
-- the modules from the game engine, so that you can include
-- only this file.

--Instead modules
require "xact"
require "hideinv"
require "para"
require "dash"
require "quotes"
require "sprites"
require "theme"
require "timer"
require "click"
require "snapshots"
require "prefs"
require "kbd"

--Engine modules
require "lib/util"
require "lib/engine"
require "lib/mainmenu"
require "lib/rooms"
require "lib/navigation"
require "lib/dialog"
require "lib/inventory"
require "lib/tact"
require "lib/episodes"
require "lib/musplayer"
require "lib/bonus"

function ico(s)
  return const.path.gfx.."icons/"..s..".png"; 
end

function ctile(s)
  return const.path.gfx.."game/common/"..s..".jpg"; 
end

------------------------------------------------------------------------
--Inits
radical = {}

function radical.init()
  format.para_space = "";  
  game.fading=10;
  click.button = true;
  hook_keys("escape");
  
  drawing.init();
  tact.init();
  musplayer.init();
  dia.init();
  inventory.init();
  rooms.init();
  mainmenu.init();
  episodes.init();
  bonus.init();
end

radical.init();

function start()
  if _lastsound ~= nil then
    play_sound(_lastsound[1],_lastsound[2],_lastsound[3]);
    _lastsound = nil;
  end
end